#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
char my_strstr(const char* str1, const char* str2) {
	char* ret = str1;
	char* p1 = ret;
	char* p2 = str2;
	if (!*p2)return NULL;
	while (*ret ){
			 
		    p1=ret;
			 p2 = str2;
		while(*p1&&*p2&&(*p1 == *p2)) {
			p1++;
			p2++;
		}
		if (!*p2 )
			return ret; 
		
		ret++;
		
	}
	
	return NULL;


}



int main() {
	char str1[] = "cbbbcdfgd";
	char str2[] = "bbcd";
	char*p=my_strstr(str1, str2);
	printf("%s", p);
	return 0;
}